package month4.day26;

import java.io.FileOutputStream;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class S3 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        SimpleDateFormat sdf=new SimpleDateFormat("hh:mm:ss");
        Date date=new Date();
        try {
            OutputStream out=new FileOutputStream("E:\\Java8\\新建文件夹\\java78.txt");
            while (true){
                System.out.println("输入字符");
                String str=in.next();
                if(str.equals("quit"))
                    break;
                out.write(sdf.format(date.getTime()).getBytes());
                out.write("  ".getBytes());
                out.write(str.getBytes());
                out.write("\n".getBytes());
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }
}
